use crate::entity::table::SysUserOnline;
use crate::config::init_db;

pub async fn check_user_online(id: String) -> (bool, Option<Vec<SysUserOnline>>) {
     match SysUserOnline::select_by_column(&init_db(), "token_id", id).await {
        Ok(model) => (true,Some(model)),
        Err(_) => (false,None)
    }
}